package com.tanhua.model.vo;

/**
 * @author fff
 * @date 2021/12/11 12:45
 **/

import com.tanhua.model.domain.Questionnaire;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class QuestionnaireVo implements Serializable {
    private String id;    //问卷编号
    private String name; //问卷名称
    private String cover;   //封面
    private String level;   //级别
    private Integer star;   //星别
    private Integer isLock; //是否锁住
    private String reportId;    //最新报告id

   /* private String questionId;//试题编号
    private String question;//题目*/
    private List<QuestionVo> questions = Collections.emptyList();





    public static QuestionnaireVo init(Questionnaire questionnaire
                                      //,List <QuestionVo>  questions
                                       ) {
        QuestionnaireVo vo = new QuestionnaireVo();
        BeanUtils.copyProperties(questionnaire, vo);


      //  BeanUtils.copyProperties(questions, vo);
        return vo;
    }

}
